score_e = float(input("请输入你的英语成绩："))
score_c = float(input("请输入你的语文成绩："))
sum_score = score_e + score_c
average_score = sum_score / 2
if average_score >= 90:
    if score_e >= 90:
        print("优A")
    elif score_e >= 80:
        print("优B")
    elif score_e >= 60:
        print("优C")
    else:
        print("不合格")
elif average_score >= 80:
    if score_e >= 90:
        print("良A")
    elif score_e >= 80:
        print("良B")
    elif score_e >= 60:
        print("良C")
    else:
        print("不合格")
else:
    print("不合格")